Skip to content

Conversation

@aryamohanan
Copy link
Contributor

@aryamohanan aryamohanan commented Nov 14, 2025

BREAKING CHANGE

  • Dropped support for --experimental-loader
  • Dropped support for esm-loader.mjs file

Notes:

--experimental-loader is already not working for Node versions >= v18.19.0 (documented already)
esm-loader.mjs works with --experimental-loader only.
We are dropping support for < v18.19.

Reference

Node.js Version Loader Command Tracing Behavior Before(v5) Tracing Behavior After(v5) Notes
18.18 --experimental-loader ./node_modules/@instana/collector/esm-loader.mjs ✅ Worked ❌ No longer works 18.18 support dropped in v5.
18.18 --import ./node_modules/@instana/collector/esm-register.mjs ❌ Already didn’t work ❌ Still doesn’t work register api not available in earlier versions
18.19+ --experimental-loader ./node_modules/@instana/collector/esm-loader.mjs ❌ Already didn’t work ❌ Still doesn’t work ESM off-thread; early tracer exit with error log in v5.
18.19+ --import ./node_modules/@instana/collector/esm-register.mjs ✅ Works ✅ Works Recommended approach for Node ≥18.19; ensures ESM tracing.
18.19+ autotrace set to module_v1 ❌ Already didn’t work ❌ Still doesn’t work ESM off-thread; early tracer exit with error log in v5.

Autotrace webhook: https://github.ibm.com/instana/autotrace-mutating-webhook/pull/670

@kirrg001
Copy link
Contributor

We need a todo to cleanup task for internal Github usages of "--experimental-loader".

// eslint-disable-next-line max-len
`The package @instana/aws-fargate requires at least Node.js ${nodeJsVersionCheck.minimumNodeJsVersion} but this process is ` +
`running on Node.js ${process.version}. This Fargate container will not be monitored by Instana.` +
'See https://www.ibm.com/docs/en/instana-observability/current?topic=agents-aws-fargate#versioning.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.ibm.com/docs/en/instana-observability/current?topic=agents-aws-fargate#versioning

Is this still a valid link? 🤔
If not, its probably good to fix that straight on main branch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it does, but somehow I cant follow we link there specifically 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this link and add the v4-v5 migration link once its available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a TODO in v5

console.error(
`The package @instana/aws-fargate requires at least Node.js ${minimumNodeJsVersion} but this process is ` +
// eslint-disable-next-line max-len
`The package @instana/aws-fargate requires at least Node.js ${nodeJsVersionCheck.minimumNodeJsVersion} but this process is ` +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a customer uses < 18.19 and the legacy esm loader, he will first run into this warning. Then he updates the node version, restarts and then he runs into the next warning.

I am wondering if we should already link to the migration? 🤔 Because we currently only link to agents-aws-fargate#versioning.

Copy link
Contributor

@kirrg001 kirrg001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-approving

Co-authored-by: kirrg001 <[email protected]>
@aryamohanan aryamohanan mentioned this pull request Nov 25, 2025
17 tasks
@aryamohanan aryamohanan marked this pull request as ready for review November 25, 2025 11:01
@aryamohanan aryamohanan requested a review from a team as a code owner November 25, 2025 11:01
@aryamohanan aryamohanan merged commit 853d1e9 into v5-release Nov 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v5 v5 release items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants